<template>
  <view class="index-page">
    <!-- 顶部标题 -->
    <view class="header">
      <text class="title">趣味写字</text>
      <text class="subtitle">让学习变得更有趣！</text>
    </view>
    
    <!-- 游戏入口区域 -->
    <view class="game-entries">
      <view class="game-card" @click="goToStroke">
        <image class="card-image" src="/static/images/stroke-icon.png" mode="aspectFit"/>
        <view class="card-info">
          <text class="card-title">笔画练习</text>
          <text class="card-desc">从基础笔画开始学习</text>
        </view>
      </view>
      
      <!-- 可以添加更多游戏卡片 -->
    </view>
  </view>
</template>

<script>
export default {
  methods: {
    goToStroke() {
      uni.navigateTo({
        url: '/pages/stroke/index'
      });
    }
  }
}
</script>

<style>
.index-page {
  min-height: 100vh;
  background-color: #FFF9F9;
  padding: 40rpx;
}

.header {
  text-align: center;
  margin-bottom: 60rpx;
}

.title {
  font-size: 48rpx;
  color: #FF9999;
  font-weight: bold;
  margin-bottom: 20rpx;
  display: block;
}

.subtitle {
  font-size: 28rpx;
  color: #999;
}

.game-entries {
  padding: 20rpx;
}

.game-card {
  background: white;
  border-radius: 20rpx;
  padding: 30rpx;
  margin-bottom: 30rpx;
  display: flex;
  align-items: center;
  box-shadow: 0 4rpx 12rpx rgba(0,0,0,0.1);
}

.card-image {
  width: 120rpx;
  height: 120rpx;
  margin-right: 30rpx;
}

.card-info {
  flex: 1;
}

.card-title {
  font-size: 32rpx;
  color: #333;
  font-weight: bold;
  margin-bottom: 10rpx;
  display: block;
}

.card-desc {
  font-size: 24rpx;
  color: #666;
}
</style> 